package single.demo08;

/**
 * 枚举的方式
 */
public class Demo08 {
    public static void main(String[] args) {

        Single instance = Single.INSTANCE;
        instance.helloWorld();
    }

}


enum Single{
    INSTANCE;

    public void helloWorld(){
        System.out.println("hello world");
    }
}